#include <REGX52.H>
#include <INTRINS.H>
#include "LCD1602.h"
#include "delay.h"

void main()
{
	unsigned int result = 0;
	
	LCD_Init();
	
	LCD_ShowChar(1, 1, 'A');
	LCD_ShowChar(1, 2, 'B');
	LCD_ShowChar(1, 3, 'C');
	LCD_ShowChar(1, 4, 'D');
	
	LCD_ShowChar(1, 5, 'E');
	LCD_ShowChar(1, 6, 'F');
	LCD_ShowChar(1, 7, 'G');
	LCD_ShowChar(1, 8, 'H');
	
	
	LCD_ShowChar(1, 9,  'I');
	LCD_ShowChar(1, 10, 'G');
	LCD_ShowChar(1, 11, 'K');
	LCD_ShowChar(1, 12, 'L');
	
	
	LCD_ShowChar(1, 13, 'M');
	LCD_ShowChar(1, 14, 'N');
	LCD_ShowChar(1, 15, 'O');
	LCD_ShowChar(1, 16, 'P');
	
	
	LCD_ShowString(2, 1, "Hello World, STC51!");
	
	
	
	Delay(2000);
	LCD_Init();
	
	LCD_ShowNum(1, 3, 5, 4);
	
	Delay(2000);
	LCD_Init();
	
	LCD_ShowSignedNum(1, 12, -66, 2);
	
	
	LCD_Init();
	while(1)
	{
		Delay(1000);
		LCD_ShowNum(1,1,result,6);
		result++;

	}
}
